//  i18n
// 1 引入库
import Vue from 'vue'
import VueI18n from 'vue-i18n'
// 2 注册
Vue.use(VueI18n)
//  引入字典
// element
import elementEN from 'element-ui/lib/locale/lang/en'
import elementZH from 'element-ui/lib/locale/lang/zh-CN'
// 菜单语言包
import customZH from './zh'
import customEN from './en'
// 3 创建实例
export default new VueI18n({
  // 当前语言标记
  locale: localStorage.getItem('lang') || 'zh',
  // 字典信息
  messages: {
    zh: {
      luck: '肥肥开心快乐每一天',
      morning: '早安',
      ...elementZH,
      ...customZH
    },
    en: {
      luck: 'Have a nice day to you baby!',
      morning: 'Good morning',
      ...elementEN,
      ...customEN
    }

  }
})

